package countor;
/**
 * 通用阻塞计数器计数,最大计数Long.MAX_VALUE
 * @author dingnate
 */
public class NormalCountor<T> implements ICountor<T> {
	private T owner;
	private long count = 0;

	public NormalCountor(T owner) {
		super();
		this.owner = owner;
	}

	public final void incr() {
		++count;
	}

	public final Long getCount() {
		return count;
	}

	public final T getOwner() {
		return owner;
	}

	@Override
	public String toString() {
		return "Counter [" + "count=" + getCount() + ", owner=" + owner + "]";
	}
}